import axios from 'axios';
const instance = axios.create({
  baseURL: 'http://localhost:9090',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `${localStorage.getItem('token')}`
  }
});
instance.interceptors.response.use((res) => {
  if (res.headers['authorization']) {
    localStorage.setItem("token", res.headers['authorization']);
  }
  return res;
}, (error) => Promise.reject(error));
export default instance;
